/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.letmeshare.pedagogue.core.entities;

import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import org.letmeshare.pedagogue.core.validation.ValidationException;

/**
 *
 * @author ibisuser1
 */
@Entity
@NamedQuery(name=Organization.GET_AVAILABLE_ROLES, 
        query="SELECT X FROM Role X.name LIKE ")
public class Organization extends Party{
    
    public static final String GET_AVAILABLE_ROLES = "GET_AVAILABLE_ROLES";
    public static final String ORG_ID = "orgId";
    public static final String ROLE_NAME = "roleName";
    
    private String name;
    @ManyToOne
    private Address address;
    
    @OneToMany
    private Set<RoleInstance> roles;
    
    @Override
    public void validate() throws ValidationException {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
